#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;

/*
    move()    移动元素
        move(first1, last1, first2)  将[first1, last1)区间内的元素移动到[first2, first2 + (last1 - first1))内]
        移动的元素不会被销毁

*/


int main()
{
    int buf[5] = {45,87,185,23,54};
    vector<int> v1 = {15,322,153,44,615};

    move(v1.begin(), v1.end(), buf);

    for (auto i : buf)
    {
        cout << i << " ";
    }
    cout << endl;
    for (auto i : v1)
    {
        cout << i << " ";
    }
    cout << endl;


    return 0;
}
